﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data.MySqlClient;

namespace iBank.Datos
{
    class BaseDeDatos
    {
        public static MySqlConnection Conexion()
        {
            string server = "Server=localhost;Database=ibankservidor;Uid=root;Pwd=;";
            try
            {
                MySqlConnection con = new MySqlConnection(server);
                con.Open();
                Console.WriteLine("se conecto con la base de datos");
                return con;
            }
            catch (Exception ex)
            {
                Console.WriteLine("hay un error");
                return null;
            }
        }


    }
}
